﻿using HCQ2_IBLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HCQ2_Model;
using HCQ2_Model.APPModel.ParamModel;
using HCQ2_Model.VR.Params;

namespace HCQ2_BLL
{
    public partial class T_VROnLineUserBLL: IT_VROnLineUserBLL
    {
        //******************************************pc*********************************************
        /// <summary>
        ///  获取在线用户列表
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public List<OnLineUserModel> GetOnLineList(ExperRecordModel param)
        {
            List<T_VROnLineUser> list = DBSession.IT_VROnLineUserDAL.GetOnLineList(param);
            return list?.Select(s => s.ToPOCO())?.ToList();
        }
        /// <summary>
        ///  获取在线用户数量
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public int GetOnLineNum(ExperRecordModel param)
        {
            return DBSession.IT_VROnLineUserDAL.GetOnLineNum(param);
        }
        //******************************************接口*******************************************
        /// <summary>
        ///  用户在线用户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public List<OnLineUserModel> GetOnLineUser(QueryRecordModel model)
        {
            List<T_VROnLineUser> list = DBSession.IT_VROnLineUserDAL.GetOnLineUser(model);
            if (list == null || list.Count <= 0)
                return null;
            return list?.Select(s => s.ToPOCO())?.ToList();
        }
    }
}
